﻿namespace Assets.Scripts.DL.Enemy.CommonEnemy.States.Special {
	public class EnemySpecialHFSM : CommonHFSM {
		public EnemySpecialHFSM(Controller controller, StateEnum stateName) : base(controller, stateName) {
			AddConditionToSelf(() => false);

			AddNewTransition(StateEnum.CommonHFSM, () => _controller.IsAnimPlayOver() && !_controller.StateData.IsDie);
		}

		public override void Enter() {
			base.Enter();
			if (_controller.StateData.CurHP < 0) {
				_controller.StateData.IsDie = true;
			}
		}
	}
}
